
cmake_minimum_required(VERSION 3.5.0)
project(burnpipe VERSION 2.3.3)

set(CMAKE_CXX_STANDARD 14)

option(USE_OPENCV "if enable oipencv" ON)

include_directories(include/)
include_directories(src/)

IF(APPLE)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64 -finline-functions -Wno-deprecated-declarations -Wno-c++17-extensions")
    add_definitions(-D_ENABLE_LIKELY_)
ELSEIF(UNIX)
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -pthread -Wno-format-overflow")
    add_definitions(-D_ENABLE_LIKELY_)
ELSEIF(WIN32)
    if(MSVC)
        add_definitions(/utf-8)
        add_compile_options(/wd4996)
        add_compile_options(/wd4267)
        add_compile_options(/wd4018)
    endif(MSVC)
ENDIF()

file(GLOB_RECURSE CGRAPH_SRC_LIST "./src/*.cc" "./src/*/*.cc" "./src/*.h")
# message(STATUS ${CGRAPH_SRC_LIST})
add_library(burnpipe STATIC ${CGRAPH_SRC_LIST})

add_subdirectory(examples/)

# add_executable(demo_simple examples/demo_simple.cc ${CGRAPH_SRC_LIST})